import { ApiProperty } from '@nestjs/swagger';

class UserInfo {
  @ApiProperty({
    description: '用户id',
  })
  id: number;
  @ApiProperty({
    description: '用户名',
  })
  username: string;
  @ApiProperty({
    description: '密码',
  })
  password: string;
  @ApiProperty({
    description: '邮箱',
  })
  email: string;
  @ApiProperty({
    description: '是否为管理员',
  })
  isAdmin: number;
  @ApiProperty({
    description: '是否为冻结',
  })
  isFrozen: number;
  @ApiProperty({
    description: '昵称',
  })
  nickName: string;
  @ApiProperty({
    description: '手机号',
  })
  phoneNumber: string;
  @ApiProperty({
    description: '创建时间',
  })
  createTime: Date;
  @ApiProperty({
    description: '角色',
    example: ['管理员'],
  })
  roles: string[];
  @ApiProperty({
    description: '权限',
    example: ['ccc'],
  })
  permissions: string[];
}
export class LoginUserVo {
  @ApiProperty({
    description: '用户信息',
  })
  userInfo: UserInfo;
  @ApiProperty({
    description: 'accessToken',
  })
  accessToken: string;
  @ApiProperty({
    description: 'refreshToken',
  })
  refreshToken: string;
}
